package com.dmcliver.expensemanager.datalayer;
import java.util.List;

import javax.persistence.EntityManager;

import org.hibernate.Session;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;

import com.dmcliver.expensemanager.entity.Accountuser;


@Name(value = "accountuserDAO")
@AutoCreate
public class AccountuserDAOImpl implements AccountuserDAO {

	@In
	private EntityManager entityManager;
	
	/* (non-Javadoc)
	 * @see AccountuserDAO#findAll()
	 */
	public List<Accountuser> findAll(){
		
		Session session = entityManager.unwrap(Session.class);
		return session.createCriteria(Accountuser.class).list();
	}
}
